home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / MPW / indent 1.8 / sys.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-19  |  1.7 KB  |  85 lines  |  [TEXT/MPS ]

  1. /* Copyright (C) 1992 Free Software Foundation, Inc.
  2.  
  3.    This program is free software; you can redistribute it and/or modify
  4.    it without restriction.
  5.  
  6.    This program is distributed in the hope that it will be useful,
  7.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  8.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  */
  9.  
  10. #include <stdio.h>
  11.  
  12. /* Values of special characters. */
  13. #define TAB '\t'
  14. #define EOL '\n'
  15. #define BACKSLASH '\\'
  16.  
  17. #ifdef DEBUG
  18. extern int debug;
  19. #endif
  20.  
  21. #ifdef __GNUC__
  22. #define INLINE __inline__
  23. #else
  24. #define INLINE
  25. #endif
  26.  
  27. #ifdef VMS
  28. # define ONE_DOT_PER_FILENAME 1
  29. # define NODIR 1
  30. # define PROFILE_FORMAT "%s%s"
  31. # define BACKUP_SUFFIX_STR    "_"
  32. # define BACKUP_SUFFIX_CHAR   '_'
  33. # define BACKUP_SUFFIX_FORMAT "%s._%d_"
  34. # define SYS_READ vms_read    /* Defined in io.c */
  35. # ifdef VAXC
  36. #  include <unixio.h>
  37. # endif
  38. #endif /* VMS */
  39.  
  40. #ifdef __MSDOS__
  41. #define ONE_DOT_PER_FILENAME 1
  42. #define USG   1
  43. #define NODIR 1
  44. #endif /* __MSDOS__ */
  45.  
  46. #ifdef macintosh
  47. # define PROFILE_FORMAT "%s%s"
  48. # define USG 1
  49. # include <fcntl.h>
  50. # ifdef MPW
  51. #  include <CursorCtl.h>
  52. #  ifdef __STDC__
  53. extern void fsetfileinfo (char *filename, unsigned long newcreator, unsigned long newtype);
  54. #  endif
  55. # endif /* MPW */
  56. #endif /* macintosh */
  57.  
  58. /* configure defines USG if it can't find bcopy */
  59.  
  60. #ifndef USG
  61. #define memcpy(dest,src,len) bcopy((src),(dest),len)
  62. #endif
  63.  
  64. struct file_buffer
  65. {
  66.   char *name;
  67.   unsigned long size;
  68.   char *data;
  69. };
  70.  
  71. extern struct file_buffer *read_file (), *read_stdin ();
  72.  
  73. /* Standard memory allocation routines.  */
  74. #ifdef macintosh
  75. #include <stdlib.h>
  76. #include <string.h>
  77. #else
  78. char *malloc ();
  79. char *realloc ();
  80. #endif
  81.  
  82. /* Similar, but abort with an error if out of memory (see globs.c).  */
  83. char *xmalloc ();
  84. char *xrealloc ();
  85.